#ifndef _PM_ENGINE_IMPL_HPP_
#define _PM_ENGINE_IMPL_HPP_

#include "api/pm_engine.hpp"

#include <vector>

/*---------------------------------------------------------------------------*/

namespace ProjectManager {

/*---------------------------------------------------------------------------*/

class EngineImpl
	:	public Engine
{
/*---------------------------------------------------------------------------*/

public:

/*---------------------------------------------------------------------------*/

	virtual ~EngineImpl();

	virtual Project& newProject( const std::string& _name );

	virtual Repository& newRepository(
			const std::string& _name
		,	const std::string& _url
		,	const std::string& _username = ""
		,	const std::string& _password = ""
	);

	virtual Trigger& newTrigger(
			const Repository& _repository
		,	unsigned int _checkInterval
	);

	virtual int getProjectsCount() const;

	virtual Project& getProject( int _idx );

/*---------------------------------------------------------------------------*/

private:

/*---------------------------------------------------------------------------*/

	std::vector< Project* > m_projects;

	std::vector< Repository* > m_repositories;

	std::vector< Trigger* > m_triggers;

/*---------------------------------------------------------------------------*/

};

/*---------------------------------------------------------------------------*/

} // namespace ProjectManager

/*---------------------------------------------------------------------------*/

#endif // _PM_ENGINE_IMPL_HPP_
